package com.example.infowall02.service;

import com.example.infowall02.domain.CommentRequest;

import java.util.Date;
import java.util.List;

public interface CommentService {
    //增
    boolean insertComment(CommentRequest commentRequest);
    //删
    int deleteComment(Integer commentId);
    // 查
    CommentRequest findCommentById(Integer commentId);
    List<CommentRequest> findCommentsByArticleId(Integer articleId, int pageNow, int pageSize);
    boolean hasUserCommentedArticle(int userId, int articleId);
    boolean isCommentExists(Integer commentId);
    int countCommentsByArticleId(Integer articleId);
    // 改
    int updateComment(String content, Integer commentId, Date createTime);


}
